﻿using SD.Infrastructure.RepositoryBase;
using SlamDunk.MES.Domain.Entities.StockContext;
using SlamDunk.ValueObjects.Enums;
using System;
using System.Collections.Generic;

namespace SlamDunk.MES.Domain.IRepositories.Interfaces.StockContext
{
    /// <summary>
    /// 库存单据仓储接口
    /// </summary>
    public interface IStockOrderRepository : IAggRootRepository<StockOrder>
    {
        #region # 分页获取入库单列表 —— ICollection<StockInOrder> FindStockInOrdersByPage(string keywords...
        /// <summary>
        /// 分页获取入库单列表
        /// </summary>
        /// <param name="keywords">关键字</param>
        /// <param name="stockOrderClassId">库存单据类Id</param>
        /// <param name="checkStatus">审核状态</param>
        /// <param name="sourceOrderType">源单据类型</param>
        /// <param name="sourceOrderId">源单据Id</param>
        /// <param name="targetStorageLocationType">目标储存位置类型</param>
        /// <param name="targetStorageLocationId">目标储存位置Id</param>
        /// <param name="generateBarcode">是否生成条码</param>
        /// <param name="startTime">开始时间</param>
        /// <param name="endTime">结束时间</param>
        /// <param name="facilityIds">工厂模型Id集</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">页容量</param>
        /// <param name="rowCount">总记录数</param>
        /// <param name="pageCount">总页数</param>
        /// <returns>入库单列表</returns>
        ICollection<StockInOrder> FindStockInOrdersByPage(string keywords, Guid? stockOrderClassId, CheckStatus? checkStatus, SourceOrderType? sourceOrderType, string sourceOrderId, StorageLocationType? targetStorageLocationType, string targetStorageLocationId, bool? generateBarcode, DateTime? startTime, DateTime? endTime, IList<Guid> facilityIds, int pageIndex, int pageSize, out int rowCount, out int pageCount);
        #endregion

        #region # 分页获取出库单列表 —— ICollection<StockOutOrder> FindStockOutOrdersByPage(string keywords...
        /// <summary>
        /// 分页获取出库单列表
        /// </summary>
        /// <param name="keywords">关键字</param>
        /// <param name="stockOrderClassId">库存单据类Id</param>
        /// <param name="checkStatus">审核状态</param>
        /// <param name="sourceOrderType">源单据类型</param>
        /// <param name="sourceOrderId">源单据Id</param>
        /// <param name="sourceStorageLocationType">源储存位置类型</param>
        /// <param name="sourceStorageLocationId">目标储存位置Id</param>
        /// <param name="targetStorageLocationType">目标储存位置类型</param>
        /// <param name="targetStorageLocationId">目标储存位置Id</param>
        /// <param name="startTime">开始时间</param>
        /// <param name="endTime">结束时间</param>
        /// <param name="facilityIds">工厂模型Id集</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">页容量</param>
        /// <param name="rowCount">总记录数</param>
        /// <param name="pageCount">总页数</param>
        /// <returns>出库单列表</returns>
        ICollection<StockOutOrder> FindStockOutOrdersByPage(string keywords, Guid? stockOrderClassId, CheckStatus? checkStatus, SourceOrderType? sourceOrderType, string sourceOrderId, StorageLocationType? sourceStorageLocationType, string sourceStorageLocationId, StorageLocationType? targetStorageLocationType, string targetStorageLocationId, DateTime? startTime, DateTime? endTime, IList<Guid> facilityIds, int pageIndex, int pageSize, out int rowCount, out int pageCount);
        #endregion
    }
}
